<?php
	$account=$_REQUEST['tel'];
	$getuser=$_REQUEST['username'];
	$usertel=$_REQUEST['usertel'];
	$usertel2=$_REQUEST['usertel2'];
	$address=$_REQUEST['address'];
	$area=$_REQUEST['area'];
	$moren=$_REQUEST['moren'];
//	$account='15517211938';
//	$getuser='袋鼠';
//	$usertel='15517211658';
//	$usertel2='0372-5788669';
//	$address='新福路52号';
//	$area='河南安阳市殷都区';
//	$moren='true';

	$con=mysqli_connect('localhost', 'root', '', 'friday');
	if($con){
		mysqli_set_charset($con,'utf8');
		 $sql1="insert into recadress (`account`, `adress`, `area`, `getUser`, `userTel`, `userTel2`, `moren`) values ('{$account}','{$address}','{$area}','{$getuser}','{$usertel}','{$usertel2}','{$moren}')";
	    $result1=mysqli_query($con, $sql1);
      	$sql2="select * from recadress where account='{$account}'";
		$result2=mysqli_query($con,$sql2);
		$arr = mysqli_fetch_all($result2,MYSQLI_ASSOC);
		$str=json_encode($arr);
		echo $str;	
	}else {
		echo "链接未遂".mysqli_connect_error();
	}
	
	mysqli_close($con);
	?>